package com.mrd.gtimp.business.entity;

import org.hibernate.annotations.GenericGenerator;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

/**
 * 报关 商品模板信息
 * @author lenovo
 */
@Entity(name = "T_BIZ_COMMODITY_MODEL")
public class CommodityModel implements Serializable {

	/**
	 *
	 */
	private static final long	serialVersionUID	= 8382352570282208634L;

	@Id
	@GeneratedValue(generator = "paymentableGenerator")
	@GenericGenerator(name = "paymentableGenerator", strategy = "uuid")
	@Column(name = "ID")
	private String	          id;
	/**
	 * 商品名称
	 */
	private String	          name;
	/**
	 * 商品编码
	 */
	private String	          code_t;
	/**
	 * 规格型号
	 */
	private String	          goods_mode;
	/**
	 * 成交数量
	 */
	private String	          count;
	/**
	 * 成交总价
	 */
	private String	          total_price;
	/**
	 * 币制
	 */
	private String	          currency;
	/**
	 * 币制代码
	 */
	@Column(name = "currency_code_")
	private String currencyCode;
	/**
	 * 第二数量
	 */
	private String	          second_count;
	/**
	 * 目的地
	 */
	private String	          destination;
	/**
	 * 目的地代码
	 */
	private String	          destination_code;
	/**
	 * 附加编码
	 */
	private String	          code_s;
	/**
	 * 单位
	 */
	private String	          unit;
	/**
	 * 计价单位代码
	 */
	@Column(name = "unit_code_")
	private String unitCode;
	/**
	 * 成交单价
	 */
	private String	          unit_price;
	/**
	 * 第二单位
	 */
	private String	          second_unit;
	/**
	 * 征免
	 */
	private String	          levymode;
	/**
	 * 征免代码
	 */
	@Column(name = "levymode_code_")
	private String levyModeCode;
	/**
	 * 备案序号
	 */
	private String	          record_id;
	/**
	 * 法定数量
	 */
	private String	          legal_count;
	/**
	 * 法定单位
	 */
	private String	          legal_unit;
	/**
	 * 法定单位代码
	 */
	@Column(name = "legal_unit_code_")
	private String legalUnitCode;
	/**
	 * 版本号
	 */
	private String	          version_no;
	/**
	 * 货号
	 */
	private String	          goods_no;
	/**
	 * 生产厂商
	 */
	private String	          producer;
	/**
	 * 工缴费
	 */
	private String	          processing_fee;

	/**
	 * 手册项号
	 */
	private String	          handbook_item_no;

	/**
	 * 件数
	 */
	private String	          goods_number;

	/**
	 * 净重
	 */
	private String	          goods_net_weight;

	/**
	 * 毛重
	 */
	private String	          goods_gross_weight;

	/**
	 * 序号
	 */
	private String	          index_num;

	/**
	 * 合同商品项目序号
	 */
	@Column(name = "CONTRACT_NUMBER_")
	private String 			  contractNumber;

	/**
	 * 规格（客户手填）
	 */
	private String	          key_elements;

	/**
	 * 原产国
	 */
	private String	                  origin_country;

	/**
	 * 原产国代码
	 */
	private String	                  origin_country_code;

	/**
	 * 相关报关单信息
	 */
	@ManyToOne()
	@JoinColumn(name = "DECLARATION_ID")
	private DeclarationModel	declaration;

	/**
	 * 柜号
	 */
	@Column(name = "CONTAINER_NO")
	private String	          container_no;

	/**
	 * 装箱单备注
	 */
	@Column(name = "PACKINGLIST_REMARK")
	private String	          packinglist_remark;

	/**
	 * 具体包装类型
	 */
	private String	          package_type;

	public CommodityModel() {

	}

	public CommodityModel(Commodity commodity) {
		/* this.id=commodity.getId(); */
		this.name = commodity.getName();
		this.code_t = commodity.getCode_t();
		this.goods_mode = commodity.getGoods_mode();
		this.count = commodity.getCount();
		this.total_price = commodity.getTotal_price();
		this.currency = commodity.getCurrency();
		this.second_count = commodity.getSecond_count();
		this.destination = commodity.getDestination();
		this.code_s = commodity.getCode_s();
		this.unit = commodity.getUnit();
		this.unit_price = commodity.getUnit_price();
		this.second_unit = commodity.getSecond_unit();
		this.levymode = commodity.getLevymode();
		this.record_id = commodity.getRecord_id();
		this.legal_count = commodity.getLegal_count();
		this.legal_unit = commodity.getLegal_unit();
		this.version_no = commodity.getVersion_no();
		this.goods_no = commodity.getGoods_no();
		this.producer = commodity.getProducer();
		this.processing_fee = commodity.getProcessing_fee();
		this.handbook_item_no = commodity.getHandbook_item_no();
		this.goods_number = commodity.getGoods_number();
		this.goods_net_weight = commodity.getGoods_net_weight();
		this.goods_gross_weight = commodity.getGoods_gross_weight();
		this.index_num = commodity.getIndex_num();
		this.contractNumber = commodity.getContractNumber();
		this.container_no = commodity.getContainer_no();
		this.key_elements = commodity.getKey_elements();
		this.packinglist_remark = commodity.getPackinglist_remark();
		this.package_type = commodity.getPackage_type();
		this.destination_code = commodity.getDestination_code();
		this.origin_country = commodity.getOrigin_country();
		this.origin_country_code = commodity.getOrigin_country_code();
		/* this.declaration=new DeclarationModel(commodity.getDeclaration()); */
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getCode_t() {
		return code_t;
	}

	public void setCode_t(String code_t) {
		this.code_t = code_t;
	}

	public String getGoods_mode() {
		return goods_mode;
	}

	public void setGoods_mode(String goods_mode) {
		this.goods_mode = goods_mode;
	}

	public String getCount() {
		return count;
	}

	public void setCount(String count) {
		this.count = count;
	}

	public String getTotal_price() {
		return total_price;
	}

	public void setTotal_price(String total_price) {
		this.total_price = total_price;
	}

	public String getCurrency() {
		return currency;
	}

	public void setCurrency(String currency) {
		this.currency = currency;
	}

	public String getSecond_count() {
		return second_count;
	}

	public void setSecond_count(String second_count) {
		this.second_count = second_count;
	}

	public String getDestination() {
		return destination;
	}

	public void setDestination(String destination) {
		this.destination = destination;
	}

	public String getCode_s() {
		return code_s;
	}

	public void setCode_s(String code_s) {
		this.code_s = code_s;
	}

	public String getUnit() {
		return unit;
	}

	public void setUnit(String unit) {
		this.unit = unit;
	}

	public String getUnit_price() {
		return unit_price;
	}

	public void setUnit_price(String unit_price) {
		this.unit_price = unit_price;
	}

	public String getSecond_unit() {
		return second_unit;
	}

	public void setSecond_unit(String second_unit) {
		this.second_unit = second_unit;
	}

	public String getLevymode() {
		return levymode;
	}

	public void setLevymode(String levymode) {
		this.levymode = levymode;
	}

	public String getRecord_id() {
		return record_id;
	}

	public void setRecord_id(String record_id) {
		this.record_id = record_id;
	}

	public String getLegal_count() {
		return legal_count;
	}

	public void setLegal_count(String legal_count) {
		this.legal_count = legal_count;
	}

	public String getLegal_unit() {
		return legal_unit;
	}

	public void setLegal_unit(String legal_unit) {
		this.legal_unit = legal_unit;
	}

	public String getVersion_no() {
		return version_no;
	}

	public void setVersion_no(String version_no) {
		this.version_no = version_no;
	}

	public String getGoods_no() {
		return goods_no;
	}

	public void setGoods_no(String goods_no) {
		this.goods_no = goods_no;
	}

	public String getProducer() {
		return producer;
	}

	public void setProducer(String producer) {
		this.producer = producer;
	}

	public String getProcessing_fee() {
		return processing_fee;
	}

	public void setProcessing_fee(String processing_fee) {
		this.processing_fee = processing_fee;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getHandbook_item_no() {
		return handbook_item_no;
	}

	public void setHandbook_item_no(String handbook_item_no) {
		this.handbook_item_no = handbook_item_no;
	}

	public String getGoods_number() {
		return goods_number;
	}

	public void setGoods_number(String goods_number) {
		this.goods_number = goods_number;
	}

	public String getGoods_net_weight() {
		return goods_net_weight;
	}

	public void setGoods_net_weight(String goods_net_weight) {
		this.goods_net_weight = goods_net_weight;
	}

	public String getGoods_gross_weight() {
		return goods_gross_weight;
	}

	public void setGoods_gross_weight(String goods_gross_weight) {
		this.goods_gross_weight = goods_gross_weight;
	}

	public String getIndex_num() {
		return index_num;
	}

	public void setIndex_num(String index_num) {
		this.index_num = index_num;
	}

	public DeclarationModel getDeclaration() {
		return declaration;
	}

	public void setDeclaration(DeclarationModel declaration) {
		this.declaration = declaration;
	}

	public String getContainer_no() {
		return container_no;
	}

	public void setContainer_no(String container_no) {
		this.container_no = container_no;
	}

	public String getKey_elements() {
		return key_elements;
	}

	public void setKey_elements(String key_elements) {
		this.key_elements = key_elements;
	}

	public String getPackinglist_remark() {
		return packinglist_remark;
	}

	public void setPackinglist_remark(String packinglist_remark) {
		this.packinglist_remark = packinglist_remark;
	}

	public String getPackage_type() {
		return package_type;
	}

	public void setPackage_type(String package_type) {
		this.package_type = package_type;
	}

	public String getDestination_code() {
		return destination_code;
	}

	public void setDestination_code(String destination_code) {
		this.destination_code = destination_code;
	}

	public String getOrigin_country() {
		return origin_country;
	}

	public void setOrigin_country(String origin_country) {
		this.origin_country = origin_country;
	}

	public String getOrigin_country_code() {
		return origin_country_code;
	}

	public void setOrigin_country_code(String origin_country_code) {
		this.origin_country_code = origin_country_code;
	}

	public String getContractNumber() {
		return contractNumber;
	}

	public void setContractNumber(String contractNumber) {
		this.contractNumber = contractNumber;
	}

	public String getCurrencyCode() {
		return currencyCode;
	}

	public void setCurrencyCode(String currencyCode) {
		this.currencyCode = currencyCode;
	}

	public String getUnitCode() {
		return unitCode;
	}

	public void setUnitCode(String unitCode) {
		this.unitCode = unitCode;
	}

	public String getLevyModeCode() {
		return levyModeCode;
	}

	public void setLevyModeCode(String levyModeCode) {
		this.levyModeCode = levyModeCode;
	}

	public String getLegalUnitCode() {
		return legalUnitCode;
	}

	public void setLegalUnitCode(String legalUnitCode) {
		this.legalUnitCode = legalUnitCode;
	}
}
